import request from '@/utils/request'

// 查询网络配置列表
export function listChannelSearch(query) {
  return request({
    url: '/system/channelSearch/list',
    method: 'get',
    params: query
  })
}

//频道搜索
export function m3GetService(data){
  return request({
    url: '/system/channelSearch/m3GetService',
    method: 'post',
    data: data
  })
}

export function startChannelScanData(data){
  return request({
    url: '/system/channelSearch/startChannelScanData',
    method: 'post',
    data: data
  })
}

export function stopChannelScanData(data){
  return request({
    url: '/system/channelSearch/stopChannelScanData',
    method: 'post',
    data: data
  })
}

//清除频道
export function resetProgramDbsData(data){
  return request({
    url: '/system/channelSearch/resetProgramDbsData',
    method: 'post',
    data: data
  })
}

//清除频道设置
export function resetSetPrfData(data){
  return request({
    url: '/system/channelSearch/resetSetPrfData',
    method: 'post',
    data: data
  })
}
 // 设置合理的超时时间(毫秒)
  // const timeout = 30000; // 30秒
   const timeout = 300000; // 300秒 5分钟

//一键配置功能
export function clearAgainScan(){
  return request({
    url: '/system/channelSearch/clearAgainScan',
    timeout: timeout, 
    method: 'post',
  })
}

